/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.gob.pnp.actions;

import com.opensymphony.xwork2.*;
import java.sql.*;
import java.util.*;
import pe.gob.pnp.despachadores.*;
/**
 *
 * @author  Gregorovichz Carlos Rossi
 * @date    01/04/2010
 *
 */
public class ListaPersona extends ActionSupport{
  private List<Persona> lstPersona;

    @Override
    public String execute(){
        try{
            setLstPersona(PersonaDespachador.obtenerPersona());
        }catch(SQLException ex){
            ex.printStackTrace();
            return ERROR;
        }
        return SUCCESS;
    }

    /**
     * @return the lstPersona
     */
    public List<Persona> getLstPersona() {
        return lstPersona;
    }

    /**
     * @param lstPersona the lstPersona to set
     */
    public void setLstPersona(List<Persona> lstPersona) {
        this.lstPersona = lstPersona;
    }
}
